-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/search improvements #304
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
|
const SEARCH_INDEX_PATH = '/cigaradvisor/index/search-index.json'; | ||
const articleIndexData = []; | ||
|
||
const searchIndexData = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will ever be populated? Can you run some tests and see if this keeps data between calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bstopp you are correct...this is not getting cached between calls as we are fetching in worker... basically negating little perf improvement we could get by window.history.pushState and not reloading the page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the worker did the fetch and returned all the results. after that we don't have to actually run a search again per-page, we just change the page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bstopp But I feel that would reset all the performance improvements we achieved...mapping entire list of search results with article-index was taking time. So, it would slow the search on first load.
Can we use Service Workers and Caching API ? Reading about them now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, current performance is not bad as well even without this caching...these requests are cached on CDN rit?
Test URLs: